package cn.com.guage.dtm.injection.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.com.guage.dtm.common.core.controller.BaseController;
import cn.com.guage.dtm.injection.annotation.GuageAutowired;
import cn.com.guage.dtm.injection.domain.User;
import cn.com.guage.dtm.injection.factory.BeanFactory;
import cn.com.guage.dtm.injection.service.IUserService;

/**
 * 代码生成 操作处理
 * 
 * 
 */
@Controller
@RequestMapping("/check")
public class TestController extends BaseController
{
	
	

    @GuageAutowired
    private IUserService userService;

    @GetMapping("/getUser")
    @ResponseBody
    public User getUser()
    {
    	IUserService userService = (IUserService) BeanFactory.getBean("userService");
    	User user = userService.selectUserById(1);
    	return user;
    }
}